/**
 * @param {number[]} nums
 * @param {number} k
 * @param {number} multiplier
 * @return {number[]}
 */
var getFinalState = function(nums, k, multiplier) {
    for (;k>0;k--) {
        const index = nums.indexOf(Math.min(...nums))
        nums[index] = nums[index] * multiplier
    }
    return nums
};                                                